package com.bml.architect.consumer.service;

import com.bml.architect.DemoService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;

//@EnableAutoConfiguration
public class MockServiceConsumer {

    @Reference(version = "timeout",timeout = 3000,mock = "true")
    private DemoService demoService;

    public static void main(String[] args) {
        ConfigurableApplicationContext ca = SpringApplication.run(MockServiceConsumer.class);

        DemoService demoServiec = ca.getBean(DemoService.class);
        System.out.println(demoServiec);
        System.out.println(demoServiec.sayHello("bml"));
    }
}
